package basic.io;

import java.io.*;

public class InputStreamReaderDemo {
	

	
	public static void main(String[] args) throws IOException {
       OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("b.txt"),"GBK");
		InputStreamReader isr = new InputStreamReader(new FileInputStream("b.txt"),"GBK");
		osw.write("");
		osw.close();
		int ch=0;
		while((ch=isr.read())!=-1){
			  System.out.print((char)ch);
		}
		
		isr.close();
	}

}
